<html>
  <head>
    <link type="text/css" rel="stylesheet" href="static/stylesheets/admin.css" />
  </head>
  <body>
    <b>Progress Stats</b>
    <table class="statsTable">
    {% for progress in progress_stats %}
      <tr>
        <td>{{ progress.status }}</td>
        <td>
          {{ progress.student_count }} 
        </td>
      </tr>
    {% endfor %}
    </table>
    <br>

    <b>Response Rate</b>: {{ response_rate }}%
    <br><br>
    
    <b>RA Stats</b>
    <table class="statsTable">
    {% for ra in ra_stats %}
      <tr>
        <td>{{ ra.ra_name }}</td>
        <td>
          {{ ra.completed_count }} of {{ ra.student_count }}
        </td>
        <td>
          <span style="font-size: 14px;">
             ({{ ra.percent_completed }}%)
          </span>
        </td>
      </tr>
    {% endfor %}
    </table>
    <br>

    <b>Dorm Stats</b>
    <table class="statsTable">
    {% for dorm in dorm_stats %}
      <tr>
        <td>{{ dorm.dorm_name }}</td>
        <td>
          {{ dorm.completed_count }} of {{ dorm.student_count }}
        </td>
        <td>
          <span style="font-size: 14px;">
             ({{ dorm.percent_completed }}%)
          </span>
        </td>
      </tr>
    {% endfor %}
    </table>
    <br>

    <b>Network Survey Stats</b>
    <br><br>

    Unique friends: {{ friend_survey_stats.unique_friends }}<br>
    Average friends: {{ friend_survey_stats.avg_friends }}<br>
    Max friends: {{ friend_survey_stats.max_friends }}<br>
    Min friends: {{ friend_survey_stats.min_friends }}
    <br><br>

    <table class="statsTable">
    {% for student_stats in friend_survey_stats.student_stats %}
      <tr>
        <td>Student {{ student_stats.student_id }}</td>
        <td>{{ student_stats.friend_count }} friends</td>
        {% if student_stats.fb_friends %}
          <td>(FB friends: {{ student_stats.fb_friends}}, FB matches: {{ student_stats.fb_matches}})</td>
        {% endif %}
      <tr>
    {% endfor %}
    </table>
  </body>
</html>
